package cqgans.app.sunao.com.cqgans.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cqgans.app.sunao.com.cqgans.bean.RankInfo;
import cqgans.app.sunao.com.cqgansnew.R;

public class RankAdapter extends BaseQuickAdapter<RankInfo, BaseViewHolder> {
    public RankAdapter(@Nullable List<RankInfo> data) {
        super(R.layout.item_rank_list, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, RankInfo item) {
        helper.setText(R.id.rank_tv, item.rank)
                .setText(R.id.user_no_tv, item.staffNo)
                .setText(R.id.user_name_tv, item.staffName)
                .setText(R.id.sales_count_tv, item.totalSales + "元")
        .setText(R.id.user_dept_tv, item.companyName + "  " + item.managementName);
    }
}
